<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style>
    
  </style>
</head>
<body>
  
</body>
<script>

  var arr = [6,7,8];
  console.log(arr);
  arr[1] = "abc";
  arr[7] = "w"
  console.log(arr);

  var str = "hello";
  console.log(str);
  str[1] = "啊";
  str.length = 2;
  str + "world";
  str[6] = "q"
  delete str[2];
  console.log(str[2]);
  console.log(str);

  // 修改变量，给变量重新赋值
  str = "H" + str[1] + str [2] + str [3] + str[4];
  console.log(str);

  
</script>
</html>